/*
 * @LastEditors: yuSeen
 * @LastEditTime: 2022-01-06 21:40:49
 */

import { DisplayModeEnmu, ISettingStore } from "@/types/store/settingStore"

// 设置显示模式
export const setDisplayMode = (mode: DisplayModeEnmu, moduleState?: ISettingStore) => {
    if(mode === undefined) {
        const targetMode = moduleState?.displayMode === DisplayModeEnmu.DARK ? DisplayModeEnmu.LIGHT : DisplayModeEnmu.DARK
        return { displayMode: targetMode }
    }
    return { displayMode: mode }
}

// 设置主题色
export const setThemeColor = (color: string) => {
    return { themeColor: color }
}
